let arr = [1, 2, 3, 4]

let a = arr.reduce((sum, item) => sum + item)

console.log(a);
